Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
»

infix ||>

infix ||>

(A 
type
, B 
type
, R 
type
, a tuple A B, f Binary R A B)
 => 
R
[Contains abstract features]
infix ||> -- pipe with a two-tuple argument, destructuring the tuple into arguments

This allows changing the order of function application: instead of

f(a,b i32) => a+b
l1 := [1,2,3,4]
l2 := [4,3,2,1]
l := l1.pairs l2
.map p->{(p1,p2) := p; f p1 p2}

you can write

l1 := [1,2,3,4]
l2 := [4,3,2,1]
l := l1.pairs l2
.map (p -> p ||> f)

which often corresponds more naturally to the data flow through the code.

Type Parameters

0.094dev (2025-06-18 15:08:51 GIT hash 89cffc23ae669b0898a5564fefbf793fcb8e5ca7 built by fridi@fzen)